package org.fas.utils
{
	public class FuColor
	{
		public static const WHITE:String="white";
		public static const BLACK:String="black";
		public static const RED:String="red";
		public static const GREEN:String="green";
		public static const BLUE:String="blue";
		public static const YELLOW:String="yellow";
		public static const GRAY:String="gray";
		public static const NONE:String="none";
//		public static const white:uint=0xFFFFFF;
//		public static const black:uint=0x000000;
//		public static const red:uint=0xFF0000;
//		public static const green:uint=0x00FF00;
//		public static const blue:uint=0x0000FF;
//		public static const yellow:uint=0xFFFF00;
//		public static const gray:uint=0x333333;
		public function FuColor()
		{
		}
		public static function getAlphaByColor(_color:Number):Number {
			var pixelValue:uint = _color;
			var alphaValue:uint = pixelValue >> 24 & 0xFF;
			return Number(alphaValue); // ff					 
		}
		public static function getRedByColor(_color:Number):Number {
			var pixelValue:uint = _color;
			var red:uint = pixelValue >> 16 & 0xFF;
			return Number(red);
		}
		public static function getGreenByColor(_color:Number):Number {
			var pixelValue:uint = _color;
			var green:uint = pixelValue >> 8 & 0xFF;
			return Number(green); 
		}
		public static function getBlueByColor(_color:Number):Number {
			var pixelValue:uint = _color;
			var blue:uint = pixelValue & 0xFF;
			return Number(blue); //cc
		}
	}
}